I use google maps API to get user location and have the user select location of interest with a bubble that changes in size. Once the user comes within the user specified bubble, an alarm will trigger. Current version doesn’t use location data from the API to search for places of interest.
Permission request for location services: —
while (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED
&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);
}